package io.wins.vertx.core;

import java.util.Objects;

import io.vertx.core.Vertx;

public final class SingletonVertx {
    private static Vertx instance;

    public static void init(final Vertx vertx) {
        instance = vertx;
    }

    public static Vertx getVertx() {
        Objects.requireNonNull(instance, "vertx not initialized.");
        return instance;
    }
}
